package artid.com.arttogo.bean;

import org.json.JSONObject;

import java.io.Serializable;

/**
 * 
*    
* 项目名称：ArtworkArt   
* 类名称：SystemMessageParser   
* 类描述：系统消息实体类+解析   
* 创建人：耿卫斌   
* 创建时间：2016-6-14 上午9:46:20   
*
 */
public class SystemMessageParser extends AppItem implements Serializable {
	private static final long serialVersionUID = 1L;
	private String messid;//消息ID
	private String title;//消息标题
	private String creattime;//消息时间
	private String read;//已读未读(0为已读，1为未读)
	private String messurl;//详情的WebView地址
	private int special_id;//专场ID
	String type;
	
	
	@Override
	public void parse(JSONObject obj) {
		// TODO Auto-generated method stub
		if (null == obj) {
			return;
		}
		type = obj.optString("type");
		messid = obj.optString("messid");
		title = obj.optString("title");
		creattime = obj.optString("creattime");
		read = obj.optString("read");
		messurl = obj.optString("messurl");
		special_id = obj.optInt("special_id");
	}
	
	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public String getMessid() {
		return messid;
	}
	public void setMessid(String messid) {
		this.messid = messid;
	}
	public String getTitle() {
		return title;
	}
	public void setTitle(String title) {
		this.title = title;
	}
	public String getCreattime() {
		return creattime;
	}
	public void setCreattime(String creattime) {
		this.creattime = creattime;
	}
	public String getRead() {
		return read;
	}
	public void setRead(String read) {
		this.read = read;
	}
	public String getMessurl() {
		return messurl;
	}
	public void setMessurl(String messurl) {
		this.messurl = messurl;
	}
	public int getSpecial_id() {
		return special_id;
	}
	public void setSpecial_id(int special_id) {
		this.special_id = special_id;
	}
	public SystemMessageParser() {
		super();
	}

	public SystemMessageParser(String messid, String title, String creattime,
							   String read, String messurl, int special_id, String type) {
		super();
		this.messid = messid;
		this.title = title;
		this.creattime = creattime;
		this.read = read;
		this.messurl = messurl;
		this.special_id = special_id;
		this.type = type;
	}

	@Override
	public String toString() {
		return "SystemMessageParser [messid=" + messid + ", title=" + title
				+ ", creattime=" + creattime + ", read=" + read + ", messurl="
				+ messurl + ", special_id=" + special_id + ", type=" + type
				+ "]";
	}
}
